package com.sumfun.blog.model.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 文章 
 * @TableName article
 */
@TableName(value ="article", autoResultMap = true)
@Data
public class Article implements Serializable {

    /**
     * 博文ID
     */
    @TableId(value = "article_id", type = IdType.AUTO)
    private Long articleId;

    /**
     * 发布日期
     */
    @TableField(value = "push_data")
    private Date pushData;

    /**
     * 发表用户
     */
    @TableField(value = "article_user")
    private String articleUser;

    /**
     * 博文标题
     */
    @TableField(value = "title")
    private String title;

    /**
     * 点赞数
     */
    @TableField(value = "like_count")
    private Integer likeCount;

    /**
     * 评论数
     */
    @TableField(value = "comment_count")
    private Integer commentCount;

    /**
     * 浏览量
     */
    @TableField(value = "read_count")
    private Integer readCount;

    /**
     * 是否置顶
     */
    @TableField(value = "top_flag")
    private String topFlag;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GMT+8")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新
     */
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GMT+8")
    @TableField(value = "update_time", fill = FieldFill.INSERT)
    private Date updateTime;

    /**
     * 文章摘要
     */
    @TableField(value = "article_summary")
    private String articleSummary;

    /**
     * 文章markdown内容
     */
    @TableField(value = "content_md")
    private String contentMd;

    /**
     * 文章html内容
     */
    @TableField(value = "content_html")
    private String contentHtml;

    /**
     * 逻辑删除
     */
    @TableLogic
    private Integer isdeleted;


    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

}